<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

<div  th:fragment="bottom">

<!--    <script type='text/javascript' th:src='@{/js/jquery-ui.min-3.03029.1.js}'-->
<!--            id='jquery-ui-js'></script>-->
<!--    <script src="https://cdn.bootcdn.net/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>-->
    <script src="https://cdn.jsdelivr.net/npm/jquery-ui@1.13.2/dist/jquery-ui.min.js"></script>
<!--    <script type='text/javascript' th:src='@{/js/jquery.ui.touch-punch.min-3.0302.js}'-->
<!--            id='jqueryui-touch-js'></script>-->
<!--    <script src="https://cdn.bootcdn.net/ajax/libs/jqueryui-touch-punch/0.2.2/jquery.ui.touch-punch.min.js"></script>-->
    <script src="https://cdn.jsdelivr.net/npm/jquery-ui-touch-punch@0.2.3/jquery.ui.touch-punch.min.js"></script>
<!--    <script type='text/javascript' th:src='@{/js/clipboard.min-5.6.2.js}' id='clipboard-js'></script>-->
<!--    <script src="https://cdn.bootcdn.net/ajax/libs/clipboard.js/2.0.11/clipboard.min.js"></script>-->
    <script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.11/dist/clipboard.min.js"></script>

    <script type='text/javascript' id='popper-js-extra'>
        /* <![CDATA[ */
        var theme = {
            "ajaxurl": "https:\/\/nav.iowen.cn\/wp-admin\/admin-ajax.php",
            "addico": "https:\/\/nav.iowen.cn\/wp-content\/themes\/onenav\/images\/add.png",
            "order": "asc",
            "formpostion": "top",
            "defaultclass": "io-grey-mode",
            "isCustomize": "1",
            "icourl": "https:\/\/api.iowen.cn\/favicon\/",
            "icopng": ".png",
            "urlformat": "1",
            "customizemax": "10",
            "newWindow": "0",
            "lazyload": "1",
            "minNav": "0",
            "loading": "1",
            "hotWords": "baidu",
            "classColumns": " col-sm-6 col-md-4 col-xl-5a col-xxl-6a ",
            "apikey": "TWpBeU1UVTNOekk1TWpVMEIvZ1M2bFVIQllUMmxsV1dZelkxQTVPVzB3UW04eldGQmxhM3BNWW14bVNtWk4="
        };
        /* ]]> */
    </script>
    <script type='text/javascript' th:src="@{/js/onenav/popper.min-3.03029.1.js}" id='popper-js'></script>
<!--    <script type='text/javascript' th:src="@{/js/onenav/bootstrap.min-3.03029.1.js}"-->
<!--            id='bootstrap-js'></script>-->
<!--    <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>-->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/js/bootstrap.bundle.min.js"></script>
    <script type='text/javascript' th:src="@{/js/onenav/theia-sticky-sidebar-3.03029.1.js}"
            id='sidebar-js'></script>
    <script type='text/javascript' th:src="@{/js/onenav/lazyload.min-3.03029.1.js}"
            id='lazyload-js'></script>
    <script type='text/javascript' th:src="@{/js/onenav/jquery.fancybox.min-3.03029.1.js}"
            id='lightbox-js-js'></script>
    <script type='text/javascript' th:src="@{/js/onenav/app-3.03029.1.js}" id='appjs-js'></script>

    <!-- 菜单跳转 -->
    <script type="text/javascript">
        $(document).ready(function () {
            setTimeout(function () {
                if ($('a.smooth[href="' + window.location.hash + '"]')[0]) {
                    $('a.smooth[href="' + window.location.hash + '"]').click();
                } else if (window.location.hash != '') {
                    $("html, body").animate({
                        scrollTop: $(window.location.hash).offset().top - 90
                    }, {
                        duration: 500,
                        easing: "swing"
                    });
                }
            }, 300);
            $(document).on('click', 'a.smooth', function (ev) {
                ev.preventDefault();
                if ($('#sidebar').hasClass('show') && !$(this).hasClass('change-href')) {
                    $('#sidebar').modal('toggle');
                }
                if ($(this).attr("href").substr(0, 1) == "#") {
                    $("html, body").animate({
                        scrollTop: $($(this).attr("href")).offset().top - 90
                    }, {
                        duration: 500,
                        easing: "swing"
                    });
                }
                if ($(this).hasClass('go-search-btn')) {
                    $('#search-text').focus();
                }
                if (!$(this).hasClass('change-href')) {
                    var menu = $("a" + $(this).attr("href"));
                    menu.click();
                    toTarget(menu.parent().parent(), true, true);
                }
            });
            $(document).on('click', 'a.tab-noajax', function (ev) {
                var url = $(this).data('link');
                if (url)
                    $(this).parents('.d-flex.flex-fill.flex-tab').children('.btn-move.tab-move').show().attr('href', url);
                else
                    $(this).parents('.d-flex.flex-fill.flex-tab').children('.btn-move.tab-move').hide();
            });
        });
    </script>
    <!-- 自定义代码 -->


    <script>
        //夜间模式
        (function () {
            if (document.cookie.replace(/(?:(?:^|.*;\s*)night\s*\=\s*([^;]*).*$)|^.*$/, "$1") === '') {
                if (new Date().getHours() > 22 || new Date().getHours() < 6) {
                    document.body.classList.remove('io-black-mode');
                    document.body.classList.add('io-grey-mode');
                    document.cookie = "night=1;path=/";
                    console.log('夜间模式开启');
                } else {
                    document.body.classList.remove('night');
                    document.cookie = "night=0;path=/";
                    console.log('夜间模式关闭');
                }
            } else {
                var night = document.cookie.replace(/(?:(?:^|.*;\s*)night\s*\=\s*([^;]*).*$)|^.*$/, "$1") || '0';
                if (night == '0') {
                    document.body.classList.remove('night');
                } else if (night == '1') {
                    document.body.classList.add('night');
                }
            }
        })();

        //夜间模式切换
        function switchNightMode() {
            var night = document.cookie.replace(/(?:(?:^|.*;\s*)night\s*\=\s*([^;]*).*$)|^.*$/, "$1") || '0';
            if (night == '0') {
                document.body.classList.remove('io-grey-mode');
                document.body.classList.add('io-black-mode');
                document.cookie = "night=1;path=/"
                console.log(' ');
                $(".switch-dark-mode").attr("data-original-title", "日间模式");
                $(".mode-ico").removeClass("icon-night");
                $(".mode-ico").addClass("icon-light");
            } else {
                document.body.classList.remove('io-black-mode');
                document.body.classList.add('io-grey-mode');
                document.cookie = "night=0;path=/"
                console.log(' ');
                $(".switch-dark-mode").attr("data-original-title", "夜间模式");
                $(".mode-ico").removeClass("icon-light");
                $(".mode-ico").addClass("icon-night");
            }
        }

    </script>

    <script>
        // 使用JavaScript获取客户端IP地址
        fetch('https://api64.ipify.org?format=json')
            .then(response => response.json())
            .then(data => {
                document.getElementById('ip-address').textContent = data.ip;
                if ('36.7.153.222,36.7.147.32,117.71.58.22'.indexOf(data.ip) === -1) {
                    // 使用getElementsByClassName方法获取具有特定类名的元素
                    var elementsWithClass = document.getElementsByClassName('atlx-hidden');

                    // 遍历所有匹配的元素
                    for (var i = 0; i < elementsWithClass.length; i++) {
                        elementsWithClass[i].setAttribute("style", "display: none !important;");
                    }
                }
            })
            .catch(error => {
                console.error('Error fetching IP address:', error);
            });
    </script>
</div>

</html>